Introduction to Pluto

Week 01

Vivaldo Mendes

Instituto Universitário de Lisboa (ISCTE-IUL)

September 15, 2025

Tasks in week 1

  • Everything in this course will be done using a computer
    • Practical exercises,
    • Mock tests/exams
    • Formal evaluation moments: tests/exams

Tasks in week 1

  • We have to install two programs on your computer:
    • Julia programming language
    • Pluto.jl (one package developed for Julia)
  • Week 1 deals only with the introduction to Pluto notebooks
  • No macroeconomics will be taught during this week
  • Do not worry: this is a macroeconomics course, not a computational one

1. Installing Julia


The following slides are a short version of more detailed information available here

Installing Julia on Windows

  • Download the correct executable for the Windows OS, by clicking here: Windows installer Julia v1.11.6
  • Save the downloaded executable somewhere on your computer, or keep it in the Downloads folder.
  • Click on top of the executable to install Julia
  • Allow the installation to be done in the default directory
  • Click on: Title of the document Add Julia to PATH
  • Click on: Finish
  • Installation completed

Installing Julia on a Mac

  1. Choose the correct Apple executable according to the processor (Intel/Rosetta or Apple Silicon) on your Mac: this means that you have to choose either (2) or (3) below.
  2. If your Mac has an Intel or Rosetta processor, you can download the correct executable from here: macOS x86 (Intel or Rosetta) Julia v1.11.6
  3. If your Mac has an Apple Silicon processor, you can download the correct executable from here: macOS (Apple Silicon) Julia v1.11.6
  4. Check the Downloads folder and drag the executable to the Applications folder.
  5. Installation completed.

Installing Julia on Linux

See detailed information available here

2. Running Julia

Starting Julia

  • To start Julia, click on its icon on the desktop:

\(~~~~~~~~~~~~~~~~~~~~~~~~~~~~\)

Julia window

  • The following black window will appear on your monitor: \(~~~~~\)

  • Julia runs in Two modes: Julia mode and Pkg mode

  • what are these modes for? Next slides

Julia mode

  • When we start Julia, by default it runs in Julia mode.

  • In the image below, \(\color{red}{\text{julia>}}\) indicates that we are in this mode:

  • In Julia mode we do computation: we write code and the computer executes it

Julia mode: an example

  • If you type \(4+4\) after the prompt \(\color{red}{\text{julia>}}\) , followed by clicking on Enter, you will get \(8\) as the output.

Julia mode: an example

  • If you type \(4+4\) after the prompt \(\color{red}{\text{julia>}}\) , followed by clicking on Enter, you will get \(8\) as the output.

  • Julia is installed and running well.

  • Julia mode is for doing computation, but its window is ugly and not very handy

  • So for computation, we will use Pluto instead.

Pkg mode

  • To move from Julia mode to Pkg mode, in mode \(\color{red}{\text{julia>}}\) type the following character on your keyboard: \(~~\)\(\color{red}{\text{]}}\)
  • Different keyboards have different ways of typing \(~~\)\(\color{red}{\text{]}}\)
    • Alt Gr and 9 (usually do it on Windows)
    • Option and 9 (usually do it on Mac)
  • In Pkg mode we create projects and install packages

Pkg mode

  • Now, we see \(\color{blue}{\text{(@v1.11) pkg>}}\) in the black window indicating that we are in Pkg mode:

  • To go back to Julia mode, click on the following keyboard’s key:

    • \(\longleftarrow\) (on Windows),
    • delete (on a Mac)

3. Installing Pluto

Installing Pluto

  • Start Julia, if it is not already running
  • Go to Pkg mode: \(\color{blue}{\text{(@v1.11) pkg>}}\)
  • Once in Pkg mode, type:
    • add Pluto followed by clicking on Enter
  • Let the computer do the installation: no further intervention by you is required
  • When the installation is finished, go back to mode \(\color{red}{\text{julia>}}\) by clicking on: \(\longleftarrow\) (on Windows), or on delete (on a Mac)
  • That is it: Pluto is installed on your computer.

4. Updating your installation

Updating Pluto

  • From time to time, new versions of Pluto come out
  • We recommend you to update your Pluto installation every two weeks
  • It is very simple and takes around 1 minute

Updating Pluto

  • Start Julia and go to mode: \(\color{blue}{\text{(@v1.11) pkg>}}\)
  • Once in Pkg mode, type:
    • update followed by clicking on Enter
  • Let the computer update your system (you do not need to intervene during this process)
  • When the updating is finished, go back to mode \(\color{red}{\text{julia>}}\) by clicking on:
    • \(\longleftarrow\) (on Windows), or on delete (on a Mac)
  • It is done.

5. Using Pluto


See more detailed information available here

Starting Pluto

  • Start Julia and keep it in mode \(\color{red}{\text{julia>}}\)
  • Type in its black window: import Pluto ; Pluto.run()
  • Click on Enter and Julia will open Pluto in your browser:

Opening a Pluto notebook

  • A Pluto notebook is an electronic file, like an Excel file, or a Power Point file.
  • What is different is the extension of each one: .jl (for a Pluto file), .xls (for an Excel file), .ppt (for a Power Point file)
  • To open a Pluto notebook, the double-click on top of the file does not work
  • Neither do the usual drag-and-drop in Mac
  • Even if the drag-and-drop seems to work, do not do it … you will loose your work

Opening a Pluto notebook

You have to tell Pluto where your notebook is located. For this, you have to:

  • Put the Pluto notebook in a folder on your computer.
  • So your notebook has an address (Path) on your computer
  • You have to copy that address and paste it into Pluto’s Open a notebook window
  • How to get the address (Path) of your notebook?
  • See next slide

Copy your notebook’s path: Windows 11

  • Put the cursor on top of your file
  • Mouse right-click on your file
  • You will get a pop-up menu with a lot of options
  • Choose: Copy as path
  • Go to the Pluto window you have opened before
  • Paste the copied path into the Open a notebook box in the Pluto window
  • See next figure (click on any key)

Copy your notebook’s path: Windows 11

Copy your notebook’s path: Windows 10

  • Put the cursor on top of your file
  • Mouse right-click on your file
  • Choose: Properties
  • Copy the path in Location:
  • The Path will look like this:
    \(~~~~~~\) G:\Macro\Week01
  • Paste the copied path into the Open a notebook box in the Pluto window
  • See next figure (click on any key)

Copy your notebook’s path: Windows 10

Copy your notebook’s path: Mac

  • Put the cursor on top of your file
  • Mouse right-click on your file
  • Choose: Get info
  • Copy the path in Where:
  • The Path will looke like this:
    \(~~~~~~\) G:/Macro/Week01
  • Paste the copied path into the Open a notebook box in the Pluto window
  • See next figure (click on any key)

Copy your notebook’s path: Mac

Run the notebook

  • By now, you will see the notebook visible on your browser
  • To run all cells, click on Run notebook code that you see in next image:

End